package com.example.springbootdemo15_redis.controller;

import com.example.springbootdemo15_redis.entity.AccoutEntity;
import com.example.springbootdemo15_redis.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AccountController {
    @Autowired
    private AccountService service;

    @RequestMapping(value="/list")
    public List<AccoutEntity> list(){
        return service.list();
    }

}
